#!/bin/ash

if [ "$1" = "" ] ; then
	echo "Usage: guess_fstype device"
	exit
fi

if [ ! -b "$1" ] ; then
	echo unknown
	exit 1
else
	res=$(blkid "$1" | grep -o ' TYPE=.*"' | cut -f 2 -d '"')
	if [ "$res" = "" ] ; then
		echo unknown
		exit 1
	else
		echo "$res"
	fi
fi

